Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update admin border workflow #9

Merged
merged 21 commits into from
Apr 7, 2021
Merged

Conversation

brynpickering
Copy link
Member

This PR consolidates the processing of administrative borders to reduce duplication. It produces a single administrative border geopackage, with each data source as a different layer.
I can envision this being updated to only process the layers requested in the model 'scope', but for now it follows the same process as the current workflow: prepare all administrative border shapefiles, irrespective of whether or not they are needed down the line.

NOTE: this builds on #5, so could either supersede it or should be merged after it.

@@ -13,7 +13,7 @@ dependencies:
- fiona=1.8.4
- rasterio=1.0.25
- rasterstats=0.13.0
- geopandas=0.4.1
- geopandas=0.8.2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is quite a drastic upgrade. Are we sure about the consequences?

What about this here: https://geopandas.readthedocs.io/en/latest/docs/user_guide/projections.html#upgrading-to-geopandas-0-7-with-pyproj-2-2-and-proj-6?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't remember the exact reason for this upgrade, but I do remember that it was necessary to avoid some strange pyproj errors related to different packages depending on different PROJ versions. Let me check what happens...

Copy link
Member

@timtroendle timtroendle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs some minor changes, but overall looks very good to me!

It's a pity we don't have continuous integration tests; I'd feel better having one. I've opened #11.

rules/data-preprocessing.smk Outdated Show resolved Hide resolved
rules/data-preprocessing.smk Outdated Show resolved Hide resolved
rules/data-preprocessing.smk Outdated Show resolved Hide resolved
src/units.py Outdated Show resolved Hide resolved
src/administrative_borders.py Show resolved Hide resolved
tests/test_administrative_borders.py Outdated Show resolved Hide resolved
tests/test_administrative_borders.py Outdated Show resolved Hide resolved
tests/test_administrative_borders.py Outdated Show resolved Hide resolved
tests/test_administrative_borders.py Outdated Show resolved Hide resolved
tests/test_administrative_borders.py Outdated Show resolved Hide resolved
@brynpickering
Copy link
Member Author

@timtroendle ready for re-review!

Copy link
Member

@timtroendle timtroendle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Just a few minor comments.

rules/data-preprocessing.smk Outdated Show resolved Hide resolved
src/lau.py Outdated Show resolved Hide resolved
src/utils.py Outdated Show resolved Hide resolved
src/utils.py Outdated Show resolved Hide resolved
src/utils.py Outdated Show resolved Hide resolved
@brynpickering brynpickering merged commit 5cf5138 into main Apr 7, 2021
@brynpickering brynpickering deleted the update-admin-border-workflow branch April 7, 2021 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants